//
//  STUserLoginRequestDM.h
//  STShoppingMall
//
//  Created by apple on 2018/9/15.
//  Copyright © 2018年 apple. All rights reserved.
//

#import "BaseHttpDataManger.h"
#import "ZB_UserLoginRequestModel.h"

@protocol ZB_UserLoginDMDelegate <NSObject>

@optional
/**
 修改用户信息后更新用户信息
 */
- (void)delegate_ModifyUserInfoWithActionUpdateUserInfo;

/**
 退出登录
 */
- (void)delegate_LogoutSucess;

/**
 登录成功
 */
- (void)delegate_LoginSucess;
@end

@interface ZB_UserLoginRequestDM : BaseHttpDataManger
/**
 用户登录接口
 mobile:密码登录和验证码登录时，所需的手机号
 password: 密码登录时，所需的登录密码
 type :string  1：密码登录 2：验证码登录 3：微信登录 4：QQ登录 5：微博登录
 code:验证码
 第三方登录
 nickname/head_img/openid
 */
- (void)loginWithMobile:(NSString *)mobile password:(NSString *)password  type:(NSString *)type code:(NSString *)code openid:(NSString *)openid nickname:(NSString *)nickname headImg:(NSString *)headImg  compeletion:(void(^)(NSError *error))compeletion;


/**
 用户注册接口
 */
- (void)login_registerAccountWithMobile:(NSString *)mobile code:(NSString *)code password:(NSString *)password passwordTo:(NSString *)passwordTo  success:(void(^)(ZB_UserRegisterResponseModel *responseModel))success fail:(void(^)(NSError *error))fail;

/**
 用户发送验证码
 1：登录 2:注册 3：忘记密码 4：切换绑定
 */
- (void)login_sendCodeWithPtype:(NSString *)ptype mobile:(NSString *)mobile success:(void(^)(ZB_UserSendCodeResponseModel *responseModel))success fail:(void(^)(NSError *error))fail;


/**
 忘记修改密码接口
 */
- (void)login_modifyPasswordWithMobile:(NSString *)mobile code:(NSString *)code password:(NSString *)password passwordTo:(NSString *)passwordTo  success:(void(^)(ZB_UserModifyPasswordResponseModel *responseModel))success fail:(void(^)(NSError *error))fail;




@end
